package rxb.demo.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Controller;
import rxb.demo.wzyentity.Food;

import java.util.List;

/**
 * Created by admin on 2019/12/30.
 */
@Controller
public interface FoodMapper {
    @Select("select * from t_food")
    List<Food> findAll();

    @Select("select * from t_food where foodName like '%${foodName}%'")
    List<Food>findByFoodName(String foodName);

    @Delete("delete from t_food where id=#{id}")
    void deleteById(Integer id);

}
